public class TestCourseSelection {
    public static void main(String[] args) {
        // 创建教师对象
        Teacher teacher1 = new Teacher("T001", "张老师", "男");
        Teacher teacher2 = new Teacher("T002", "李老师", "女");

        // 创建课程对象
        Course course1 = new Course("C001", "Java 程序设计", "第一教学楼 301", "周一 14:00-16:00");
        Course course2 = new Course("C002", "数据结构", "第二教学楼 202", "周三 10:00-12:00");

        // 教师开课
        teacher1.offerCourse(course1);
        teacher2.offerCourse(course2);

        // 设置课程的授课教师
        course1.setTeacher(teacher1);
        course2.setTeacher(teacher2);

        // 创建学生对象
        Student student1 = new Student("S001", "小明", "男");
        Student student2 = new Student("S002", "小红", "女");

        // 学生选课
        student1.selectCourse(course1);
        student1.selectCourse(course2);
        student2.selectCourse(course1);

        // 打印学生课表
        student1.printCourseSchedule();
        student2.printCourseSchedule();

        // 学生退课
        student1.dropCourse(course2);

        // 再次打印学生课表，查看退课效果
        student1.printCourseSchedule();
    }
}